﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace LDSProject.Forms
{
    public partial class ErrorLogForm : Form
    {
        readonly MainForm _form;

        public ErrorLogForm(MainForm form)
        {
            InitializeComponent();
            _form = form;
        }

        private void btnQuery_Click(object sender, EventArgs e)
        {

        }

        private void ErrorLogForm_Load(object sender, EventArgs e)
        {
            dgRecord.DataSource = MainConsole.Instance.ErrorInfoList;
        }

        private void ErrorLogForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            MainConsole.Instance.ErrorInfoList.Clear();
            _form.btnErrLog.ForeColor = Color.Orange;
        }
    }
}
